<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>检验检查报告</title>
    <%- include('../_global/baseLibsJKDA') %>
    <link rel="stylesheet" href="/static/css/public.css"/>
    <link rel="stylesheet" href="/static/css/page-main.css"/>
    <script src="/static/js/gzd/pageUrl.js"></script>
    <script src="/static/js/gzd/jkda.js"></script>
    <!--<script src="/static/js/jkda/mbParse/mb_01_view.js"></script>-->

    <style type="text/css">
        html, body {
            width: 100%;
            height: 100%;
            margin: 0px;
        }
        body {
            transform: perspective(1400px) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform-style: preserve-3d;
            background-color: white;
        }


         .j-3 ,.j-4{
            display: inline-block;
            width: 2.38095rem;
            height: 2.14286rem;
            vertical-align: bottom;
            margin-right: 0.47619rem;
        }
         .j-3 {
            background: url(/static/images/jkda/jiuzheng-03.png) no-repeat;
            background-size: cover;
        }
         .j-4 {
            background: url(/static/images/jkda/jiuzheng-04.png) no-repeat;
            background-size: cover;
        }
        h3{
            font-size: 0.95238rem;
            font-weight: normal;
            display: inline-block;
            line-height: 2;
        }
        #ListTabBox{
            background: #fff;
        }
        #ListTabBox li{

            position: relative;
            padding: 0.71429rem 0;
            font-size: 0.95238rem;
            margin:0  0.95238rem;
            border-bottom:1px solid #eee;
        }
        #ListTabBox ul .doctor-header:after {
            position: absolute;
            display: block;
            right: 1.19048rem;
            top: 1.19048rem;
            content: "";
            width: 0.71429rem;
            height: 1.35714rem;
            background: url(/static/images/arrow-black-left.png) no-repeat;
            background-size: 100% 100%;
        }
    </style>

</head>
<body>
<header class="header-box grey fixed">
    <div class="header-content">
        <div class="left-tool">
            <a class="back" href="javascript:void(0);"><i class="iconfont icon-back"></i></a>
        </div>
        <div class="title">检验检查报告</div>
    </div>
</header>
<div class="tab-box">
    <span class="gray-line"></span>
    <ul id="ListTab">
        <li class="active" href="javascript:void(0)"  value="jc" ><a>检查报告</a></li>
        <li href="javascript:void(0)"  value="jy" ><a>检验报告</a></li>
    </ul>
</div>
<div id="ListTabBox">
    <ul class="detail" >
        <li class="b-box" id="jy" style="border-bottom: 0px;">
            <!-- <i class="detail-icon j-4"></i><h3>检验信息</h3> -->
                <div id="Jyxx"> </div>
        </li>
        <li class="b-box" id="jc" style="border-bottom: 0px;">
            <!-- <i class="detail-icon j-3"></i><h3>检查信息</h3> -->
            <div id="Jcxx">  </div>
        </li>
    </ul>
</div>
</body>
<script src="/static/js/jkda/forweb.js"></script>
<script type="text/javascript">

</script>
</html>

<script type="text/javascript">

   var page_jyjc = (function($, page_jyjc) {
       var zxwyh =$.QuickUrlUtils.getRequest("ZXWYH");
       var cfg_def = {
           indataJybg: indataJybg,
           indataJcbg: indataJcbg,
           appendToJyxx: appendToJyxx,
           appendToJcxx: appendToJcxx,
           searchConnect: searchConnect,
       }

       page_jyjc.init = function(cfg){
           $.extend(page_jyjc, cfg_def, cfg);
           page_jyjc.indataJybg();
           page_jyjc.indataJcbg();
           $("#jy").hide();
           $("#Jcxx").on("click","li",function(){
               var hosName=$(this).find("h3").text();
               var reportDate=$(this).find("p").text();
               var jcbgData=$(this).attr("data");
               StoreCache.setCache("jcbgData",jcbgData);
               $.pageSwitch.goToUrl("jkda","jcbg","hosName="+hosName+"&reportDate="+reportDate+"&zxwyh="+zxwyh);
           })
           $("#Jyxx").on("click","li",function(){
               var hosName=$(this).find("h3").text();
               var reportDate=$(this).find("p").text();
               var jybgData=$(this).attr("data");
               StoreCache.setCache("jybgData",jybgData);
               $.pageSwitch.goToUrl("jkda","jybg","hosName="+hosName+"&reportDate="+reportDate+"&zxwyh="+zxwyh);
           })
           $('#ListTab li').click(page_jyjc.searchConnect)

       }

       return page_jyjc;

       function indataJybg(){
           //查询检验报告
           $.QuickRemote.AjaxJson({
               funcName: "/api/gzd/jkda/queryJybg"
               ,callback:page_jyjc.appendToJyxx
               ,params:{
                   "zxwyh": zxwyh,
                   "currentPage": "1", //页码
                   "pageSize": "10", //显示行数
                   "medicalOrgId":"",//医疗机构代码
                   "serialNum":"",//就诊流水号
                   "beginDate":"", //查询开始时间
                   "endDate":"",//查询结束时间
                   "surveyingType":"1", //类型： 1门诊 2住院
               }
           });
       }
       function indataJcbg(){
           //查询检验报告
           $.QuickRemote.AjaxJson({
               funcName: "/api/gzd/jkda/queryJcbg"
               ,callback:page_jyjc.appendToJcxx
               ,params:{
                   "zxwyh": zxwyh,
                   "currentPage": "1", //页码
                   "pageSize": "10", //显示行数
                   "medicalOrgId":"",//医疗机构代码
                   "serialNum":"",//就诊流水号
                   "beginDate":"", //查询开始时间
                   "endDate":"",//查询结束时间
                   "surveyingType":"1", //类型： 1门诊 2住院
               }
           });
       }

       function appendToJyxx(response){
           $("#Jyxx").html(template("JybgDetail", response));
       }
       function appendToJcxx(response){
           $("#Jcxx").html(template("JcbgDetail", response));
       }

       /**选择检验报告或者检查报告*/
       function searchConnect(){
           $(this).siblings("li").removeClass("active");
           $(this).addClass("active");
           var value = $(this).attr("value");
           if(value == "jc"){
               $("#jy").hide();
               $("#jc").show();
           }else{
               $("#jc").hide();
               $("#jy").show();
           }
       }
   })(jQuery, {});

</script>
<script type="text/html" id="JcbgDetail">
    {{each rows}}
    <li class="doctor-header" data="{{$value}}">
        <h3>{{$value.hosName}}</h3>
        <p>{{$value.reportDate}}</p>
        <h6> 检验: {{$value.checkName}}</h6>
    </li>
    {{/each}}
</script>
<script type="text/html" id="JybgDetail">
    {{each rows}}
     <li class="doctor-header" data="{{$value}}">
        <h3>{{$value.hosName}}</h3>
        <p>{{$value.reportDate}}</p>
        <h6> 检验: {{$value.checkName}}</h6>
     </li>
    {{/each}}
</script>

